package com.decent.ejfadmin.finance.response.dto;

import com.decent.ejfadmin.common.bean.SupplyConsumption;
import com.decent.ejfadmin.common.enums.Operator;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author zhangchao
 * @date 2018/7/28 8:55
 */
@Data
public class SupplyCardDetailDto implements Serializable {
    private static final long serialVersionUID = 3923536200192403773L;

    private String orderId;

    private String batchId;

    private String cardNumber;

    private Integer productType;

    private String userAccount;

    private String userName;

    private String startTime;

    private Integer consumeType;

    private BigDecimal money;

    private BigDecimal balance;

    private String channel;
    /**
     * 面值
     */
    private Double face;
    /**
     * 区域
     */
    private String area;
    /**
     * 产品id
     */
    private Long productId;
    /**
     * 运营商名称
     */
    private String cardOperatorName;

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder(100);
        sb.append("=\"").append(getOrderId()).append("\"");
        sb.append(",=\"").append(getBatchId()).append("\"");
        sb.append(",=\"").append(getCardNumber()).append("\"");
        sb.append(",=\"").append(getCardOperatorName()).append("\"");
        sb.append(",=\"").append(getStartTime()).append("\"");
        sb.append(",=\"").append(getUserAccount()).append("\"");
        sb.append(",=\"").append(getUserName()).append("\"");
        sb.append(",=\"").append(SupplyConsumption.parseConsumeType(getConsumeType())).append("\"");
        sb.append(",").append(getMoney());
        sb.append(",").append(getBalance());
        sb.append("\r\n");
        return sb.toString();
    }
}
